export function useTable() {
    const gridOptions = reactive<any>({
        border: true,
        columnConfig: {
            resizable: true,
        },
        columns: [
            { field: 'name', title: '标签名称' },
            { field: 'mainCat', title: '一级分类' },
            { field: 'subCat', title: '二级分类' },
            { field: 'info', title: '说明' },
            { field: 'status', slots: { default: 'status' }, title: '状态' },
            { field: 'lastUpdateTime', title: '最后修改时间' },
        ],
        data: [],
        editConfig: {
            mode: 'row',
            showStatus: true,
            trigger: 'manual',
        },
        height: 530,
        keepSource: true,
        loading: false,
        pagerConfig: {
            currentPage: 1,
            enabled: true,
            pageSize: 10,
            pageSizes: [10, 20, 50, 100, 200, 500],
            total: 0,
        },
        showOverflow: true,
    })

    return { gridOptions }
}
